/*
    Copyright 2009 Spencer B. Koehler, Ph.D.

    This file is part of the Brillig Toolkit.

    The Brillig Toolkit is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    The Brillig Toolkit is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with The Brillig Toolkit.  If not, see <http://www.gnu.org/licenses/>.
*/
package org.brillig.extract.filter;


import org.brillig.text.DetailedUrl;

/**
 * Abstract class for wrapping a url string for filtering.
 * <p>
 * @author Spence Koehler
 */
public abstract class UrlFilterWrapper extends StringFilterWrapper {
  
  private DetailedUrl detailedUrl;

  /**
   * Construct with the given url string.
   */
  protected UrlFilterWrapper(String urlString) {
    super(urlString);

    this.detailedUrl = new DetailedUrl(urlString);
  }

  /**
   * Construct with the given detailed url.
   */
  protected UrlFilterWrapper(DetailedUrl detailedUrl) {
    super(detailedUrl.getOriginal());

    this.detailedUrl = detailedUrl;
  }

  /**
   * Accessor for this instance's input stream.
   */
  public DetailedUrl getDetailedUrl() {
    return detailedUrl;
  }

//todo: add protected utility methods that can be used by extenders.
}
